package com.zwj.config.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @author 摸鱼二长老
 * @version 1.0
 * @createTime 2023/9/9 13:13
 */
@Aspect//声明当前类味切面
//@Component//加入spring容器
@Slf4j
public class UserLogAspect {

    @Pointcut(value = "execution(* com.zwj.controller..*.*(..))")
    public void pointCut() {

    }

    @Around("pointCut()")
    public Object aroundAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
        log.error("进入环绕通知。。。。。。。。。。。。。。");
        log.error("退出环绕通知。。。。。。。。。。。。。。");
        return joinPoint.proceed();
    }
}
